﻿using DemoApp1.Attribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DemoApp1.Controllers
{
    public class ProtectedResourceController : BaseController
    {
        [CustomAuthorize]
        public ActionResult Index()
        {
            return View();
        }

        [CustomAuthorize]
        public JsonResult GetUserInfo()
        {
            var user = User.Identity.Name;
            return Json(new { Result = user }, JsonRequestBehavior.AllowGet);
        }
    }
}